package com.buka.server.mapper;


import com.buka.server.pojo.SysUser;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface UserMapper {
    @Select("select * from sys_user where username=#{username}")
    @Results({
            @Result(id = true, property = "id", column = "id"),
            @Result(property = "roles", column = "id", javaType = List.class,
                    many = @Many(select = "com.itbuka.server.mapper.RoleMapper.findByUid"))
    })
    public SysUser findByUsername(String username);
}
